package com.bosch.in.rtp1.ept.action.form;

import java.util.List;

import org.apache.struts.action.ActionForm;

import com.bosch.in.rtp1.ept.constant.CommonConstants;
import com.bosch.in.rtp1.ept.model.dto.SelectingInt;
import com.bosch.in.rtp1.ept.util.FormUtility;

/**
 * Class is used to store parameters which are conditions to set the released hold diagram
 * @author LIV1HC
 *
 */
public class ReleasedHoldDiaramForm extends ActionForm{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private List<SelectingInt> diagramTypes;
	
	private List<SelectingInt> years;
	
	private int selectedType;
	
	private int selectedYear;
	
	public ReleasedHoldDiaramForm()
	{
		this.selectedYear = CommonConstants.CURRENT_YEAR;
	}
	
	public List<SelectingInt> getDiagramTypes() {
		if (this.diagramTypes == null)
			{
				this.diagramTypes = FormUtility.buildDiagramType();
			}
		return diagramTypes;
	}
	
	public void setDiagramTypes(List<SelectingInt> diagramTypes) {
		this.diagramTypes = diagramTypes;
	}
	
	public int getSelectedType() {
		return selectedType;
	}
	
	public void setSelectedType(int selectedType) {
		this.selectedType = selectedType;
	}

	public void setYears(List<SelectingInt> years) {
		this.years = years;
	}

	public List<SelectingInt> getYears() {
		if (this.years == null)
		{
			this.years = FormUtility.buildListYears();
		}
		return years;
	}

	public void setSelectedYear(int selectedYear) {
		this.selectedYear = selectedYear;
	}

	public int getSelectedYear() {
		return selectedYear;
	}

}
